package com.p2p.backend.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.p2p.backend.controller.form.RoleForm;
import com.p2p.base.dao.BaseMapper;

/**
 * leiwen@yiqihao.com
 */
public interface RoleDao extends BaseMapper{
	
	@Select("select * from p2p_role where id=#{id}")
	Map<String, Object> get(Integer id);
	
	@Select("select * from p2p_role")
	List<Map<String, Object>> listAll();
	
	void add(RoleForm params);

	@Update("update p2p_role set name=#{name},remark=#{remark} where id=#{id}")
	void update(RoleForm params);

	@Delete("delete from p2p_role where id=#{id}")
	void delete(Integer id);
}
